/**
 * Copyright &copy; 2016-2017 <a href="http://git.oschina.net/whoamien/backend_management">Backend Management</a> All rights reserved.
 */
package com.xw.app.generator.service;

import java.util.List;

import com.xw.app.generator.vo.Column;
import com.xw.app.generator.vo.GeneratorSelection;
import com.xw.app.generator.vo.KeyColumn;
import com.xw.app.generator.vo.Table;
import com.xw.app.vo.CodeGenerateResult;

/**
 * The Interface CodeGeneratorService.
 *
 * @author Xi Wei
 */
public interface CodeGeneratorService {

	/**
	 * List tables.
	 *
	 * @return the list
	 */
	public List<Table> listTables();

	/**
	 * List columns.
	 *
	 * @param tableName the table name
	 * @return the list
	 */
	List<Column> listColumns(String tableName);

	/**
	 * List imported keys.
	 *
	 * @param tableName the table name
	 * @return the list
	 */
	List<KeyColumn> listImportedKeys(String tableName);

	/**
	 * List primary keys.
	 *
	 * @param tableName the table name
	 * @return the list
	 */
	List<KeyColumn> listPrimaryKeys(String tableName);

	/**
	 * List exported keys.
	 *
	 * @param tableName the table name
	 * @return the list
	 */
	List<KeyColumn> listExportedKeys(String tableName);

	/**
	 * Gets the table.
	 *
	 * @param tableName the table name
	 * @param setTableInColumn the set table in column
	 * @return the table
	 */
	Table getTable(String tableName,boolean setTableInColumn);

	/**
	 * Generate.
	 *
	 * @param generatorSelection the generator selection
	 * @return the code generate result
	 */
	CodeGenerateResult generate(GeneratorSelection generatorSelection);
}
